<?php
date_default_timezone_set('Asia/Shanghai');
require_once 'D://cygwin//home//GWind//symfony//lib/autoload/sfCoreAutoload.class.php';
sfCoreAutoload::register();


// 浏览器友好的变量输出
function dump($var, $echo = true, $label = null, $strict = true) {
    $label = ($label === null) ? '' : rtrim($label) . ' ';
    if (!$strict) {
        if (ini_get('html_errors')) {
            $output = print_r($var, true);
            $output = "<pre>" . $label . htmlspecialchars($output, ENT_QUOTES) . "</pre>";
        } else {
            $output = $label . print_r($var, true);
        }
    } else {
        ob_start();
        var_dump($var);
        $output = ob_get_clean();
        if (!extension_loaded('xdebug')) {
            $output = preg_replace("/\]\=\>\n(\s+)/m", "] => ", $output);
            $output = '<pre>' . $label . htmlspecialchars($output, ENT_QUOTES) . '</pre>';
        }
    }
    if ($echo) {
        echo($output);
        return null;
    }else
        return $output;
}

class ProjectConfiguration extends sfProjectConfiguration {

    public function setup() {
        $this->enablePlugins(
                'sfDoctrinePlugin',
                'sfDoctrineGuardPlugin',
                'sfJqueryReloadedPlugin',
                'sfFormExtraPlugin',
                'csDoctrineActAsCategorizablePlugin', 
                'sfJqueryTreeDoctrineManagerPlugin'
        );
    }

}
